package com.qumap.display;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.SimpleEventBus;
import com.google.gwt.user.client.ui.*;
import com.qumap.common.edit.IDisplay;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: 05.05.11
 * Time: 15:53
 * To change this template use File | Settings | File Templates.
 */
public class MapView {

	private IDisplay event_view_display;

	public MapView() {
		IMapViewDisplayCreator ev_injector = GWT.create(IMapViewDisplayCreator.class);
		event_view_display = ev_injector.getViewDisplay();
	}

	public void init() {
		EventBus edit_view_event_bus = new SimpleEventBus();
		event_view_display.setEventBus(edit_view_event_bus);
		event_view_display.init();
	}

	public Widget getEditViewWidget() {
		return event_view_display.asWidget();
	}
}
